﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Admin.Core.DbModel.sys/sys_permission 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       sys_permission
* 创建时间：  2025/6/4 10:41:17
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using SSPivot.Data.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot.Admin.Core.DbModel.sys
{
    /// <summary>
    /// 权限
    /// </summary>
    public class sys_permission : FullAuditedEntity<long>
    {
        /// <summary>
        /// 父级节点
        /// </summary>
        public long ParentId { get; set; }
        [StringLength(50)]
        public string? ParentName { get; set; }
        [StringLength(500)]
        public string? ParentIds { get; set; }
        [StringLength(500)]
        public string? ParentNames { get; set; }
        /// <summary>
        /// 权限名称
        /// </summary>
        [StringLength(50)]
        public string? Label { get; set; }

        /// <summary>
        /// 权限编码
        /// </summary>
        [StringLength(500)]
        public string? Code { get; set; }

        /// <summary>
        /// 权限类型
        /// </summary>
        public PermissionType Type { get; set; }

        /// <summary>
        /// 视图Id
        /// </summary>
        public long? ViewId { get; set; }



        /// <summary>
        /// 路由命名
        /// </summary>
        [StringLength(100)]
        public string? Name { get; set; }

        /// <summary>
        /// 路由地址
        /// </summary>
        [StringLength(500)]
        public string? Path { get; set; }

        /// <summary>
        /// 重定向地址
        /// </summary>
        [StringLength(500)]
        public string? Redirect { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        [StringLength(100)]
        public string? Icon { get; set; }

        /// <summary>
        /// 隐藏
        /// </summary>
        public bool Hidden { get; set; } = false;

        /// <summary>
        /// 展开分组
        /// </summary>
        public bool Opened { get; set; }

        /// <summary>
        /// 打开新窗口
        /// </summary>
        public bool NewWindow { get; set; } = false;

        /// <summary>
        /// 链接外显
        /// </summary>
        public bool External { get; set; } = false;

        /// <summary>
        /// 是否缓存
        /// </summary>
        public bool IsKeepAlive { get; set; } = true;

        /// <summary>
        /// 是否固定
        /// </summary>
        public bool IsAffix { get; set; } = false;

        /// <summary>
        /// 链接地址
        /// </summary>
        [StringLength(500)]
        public string? Link { get; set; }

        /// <summary>
        /// 是否内嵌窗口
        /// </summary>
        public bool IsIframe { get; set; } = false;

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [StringLength(200)]
        public string? Description { get; set; }

        /// <summary>
        /// 启用
        /// </summary>
        public bool Enabled { get; set; } = true;
    }
}
